#ifndef _FUNC_H
#define _FUNC_H

#define MH_FILE_NAME_MAX_LEN       250
#define MH_FILE_SUFFIX_MAX_LEN     6

typedef struct _FILE_INFO          FILE_INFO;
struct _FILE_INFO {
    char file_name[MH_FILE_NAME_MAX_LEN];
    char file_suffix[MH_FILE_SUFFIX_MAX_LEN];
    time_t modify_time;
    int size;
    ushort width;
    ushort height;
};

enum {
    SORT_FILE_NONE = 0,
    SORT_FILE_BY_TIME_UP,
    SORT_FILE_BY_TIME_DOWN,
    SORT_FILE_BY_SIZE_UP,
    SORT_FILE_BY_SIZE_DOWN,
    SORT_FILE_BY_NAME_UP,
    SORT_FILE_BY_NAME_DOWN,
};

#pragma pack(1)
typedef struct _SP_HEAD
{
    short signature;
    short version;
    unsigned char check[12];
    short width;        //128
    short total_rows;
    unsigned char reserve[12];
} SP_HEAD;
#pragma pack()

int usb_find(char *out);
int AuxConCheck(SP_HEAD *phead);

#endif
